package com.blog.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 * 
 * @TableName t_blog
 */
@TableName(value ="t_blog")
@Data
public class Blog implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long blogId;

    /**
     * 
     */
    @JsonSerialize(using= ToStringSerializer.class)
    private Long userId;

    @JsonSerialize(using= ToStringSerializer.class)
    private Long typeId;

    /**
     * 
     */
    private String title;

    /**
     * 博客封面
     */
    private String blogImageUrl;

    /**
     * 
     */
    private String content;

    /**
     * 
     */
    @TableField(fill = FieldFill.INSERT)//创建与修改时自动填充
    private Date createTime;

    /**
     * 
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    private Date updateTime;

    /**
     * 
     */
    private Integer collectionCount;

    /**
     * 
     */
    private Integer thumbsCount;

    /**
     * 
     */
    private Integer visitCount;

    /**
     * 
     */
    private Integer blogStatus;

    /**
     * 
     */
    private String description;

    private Integer isDelete;

    /**
     * 数据库中不存在的列，所有博客访问总量
     */
    @TableField(exist = false)
    private Integer visitTotal;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}